home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d7
/
dorpch35.arc
/
DOORPCH.DOC
< prev
next >
Wrap
Text File
|
1989-03-20
|
68KB
|
2,220 lines
D O O R P C H
=====================
Release 3.5
January 17, 1989
Clint Labarthe & Terry Shockley
Copyright (C), 1987 - 1989
Black Hole BBS, Longwood, Florida 32750
Node 1 BBS 407-260-6397
Node 2 By Subscription
300/1200/2400 24 Hours
Death Star BBS, Orlando, Florida 32751
Node 1 BBS 407-875-4123
300/1200/2400 24 Hours
Table Of Contents
=====================
Overview . . . . . . . . . . . . . . . . . . . . 1
Disclaimer Of Liability . . . . . . . . . . . . . 2
Contents Of "ARC" File . . . . . . . . . . . . . 3
Features Of This Release . . . . . . . . . . . . 5
Operating Environment . . . . . . . . . . . . . . 7
Planned Future Enhancements . . . . . . . . . . . 8
DoorPch Configuration File . . . . . . . . . . . . 9
DoorPch Routines . . . . . . . . . . . . . . . . . 10
DoorPch Variables . . . . . . . . . . . . . . . . 14
Structure Of A DOOR Program . . . . . . . . . . . 19
Include File Usage . . . . . . . . . . . . . . . 19
File Access Numbers . . . . . . . . . . . . . . 20
Starting A DOOR . . . . . . . . . . . . . . . . 20
Terminating a DOOR . . . . . . . . . . . . . . . 20
Compiling Your DOOR Program . . . . . . . . . . 21
Linking Your DOOR Program . . . . . . . . . . . 21
Executing Your DOOR Program . . . . . . . . . . 22
Programming Tip's . . . . . . . . . . . . . . . . 23
ANSI Color Graphics . . . . . . . . . . . . . . 23
Intensity Of Text . . . . . . . . . . . . . . 23
Blinking Text . . . . . . . . . . . . . . . . 23
Foreground/Background Colors . . . . . . . . . 23
Printing Output . . . . . . . . . . . . . . . . 24
Printing Complete Line . . . . . . . . . . . . 24
Printing A Partial Line . . . . . . . . . . . 24
Printing A Line & Get A Response . . . . . . . 24
Printing With Tab's . . . . . . . . . . . . . 25
Ringing The Bell . . . . . . . . . . . . . . . . 25
Adding Color The EASY Way . . . . . . . . . . . 25
Sending ANSI Music . . . . . . . . . . . . . . . 26
Bell or Alarm Toggles . . . . . . . . . . . . . 26
Clearing The Screen . . . . . . . . . . . . . . 26
BASIC Keywords . . . . . . . . . . . . . . . . . 27
High Scores & Bulletins . . . . . . . . . . . . 27
Table Of Contents
=====================
Sysop Information . . . . . . . . . . . . . . . . 28
Line 24 Of The Display . . . . . . . . . . . . . 28
Line 24/25 Of The Display . . . . . . . . . . . 28
DoorPch History . . . . . . . . . . . . . . . . . 29
DoorPch Credits . . . . . . . . . . . . . . . . . 30
Reporting Problems . . . . . . . . . . . . . . . . 31
User Enhancement Requests . . . . . . . . . . . . 32
DoorPch Registration . . . . . . . . . . . . . . . 33
Trade Marks / Copyrights . . . . . . . . . . . . . 35
DoorPch - Version 3.5
User's Guide for DOOR Programmers
Overview
========
DoorPch is a set of Basic and Assembler language routines which
facilitate the creation of a PCBoard (tm) DOOR program. All the
logic to monitor the carrier, input and output for the
communications port is included in the code. Full ANSI color
graphics and ANSI music capabilities are also included. All you
must do is follow some simple interface requirements and then
either do a GOSUB or CALL to perform the required function. The
code also maintains an informative display on lines 24 and 25 of
the local console, closely, and in some cases, exactly, like
PCBoard. The options to turn the display, bell and alarm on & off
are also at your disposal. Now, after reading this you probably
are saying "Huh ?" or "Sure!". Really! Its very simple....
DoorPch is used by more DOORs than any other software of its
kind. So join the fun of writing DOOR's. You, and countless
others, will benefit from your efforts. There are imitations,
look-a-likes and competition from other less functional software.
But there is only one DoorPch !
Page 1
DoorPch - Version 3.5
User's Guide for DOOR Programmers
Disclaimer Of Liability
=======================
We assume no liability for its use. You may copy it and share it
with others so long as the code and the documentation are
distributed together. You may include this logic in as many DOOR
programs as you wish. If you have any suggestions for
improvements to this code, reply to the address below or call our
BBS's at the number stated above. Please complete the
Registration form at the end of this documentation. This program
and all its INCLUDE and Library files are copyrighted. It is
unlawful to disassemble or otherwise decode or misuse the
software contained herein. It is for your use in creating DOORs
and may not be altered in an way. You may not charge a fee for
its use or sell it. DORPCH35.ARC is to be distributed in its
ORIGINAL ARC format and contain ALL the original files.
Send inquires to: Clint Labarthe / Terry Shockley
P. O. Box 151445
Altamonte Springs, Florida, 32701-1445
Page 2
DoorPch - Version 3.5
User's Guide for DOOR Programmers
Contents Of "ARC" File
======================
The following files should be in DORPCH35.ARC:
1. BRUN30.EXE Microsoft QuickBASIC 3.0 run-time library. It
has been patched to hold DTR. See QBDTRPCH.
2. CLE.BAT Batch file for compiling & Linking sample
DOOR program EXAMPLE.BAS.
3. COMPILE.BAT Batch file to COMPILE your source module with
library DORPCH35.EXE.
4. DOORPCH.BEG INCLUDE this code AFTER the INCLUDE
of DOORPCH.USR.
Note: Some variables must be set prior to
this INCLUDE. See README.NOW and DOCS.
5. DOORPCH.DOC This documentation. For use in developing
doors for PCBoard.
6. DOORPCH.END INCLUDE this code at the END of your program.
If you are upgrading an earlier DOOR you may
still use this code. It replaced the old
GETIN2.ASC.
7. DOORPCH.USR COMMON variables. INCLUDE this code at the
BEGINNING of your program.
8. DOORPCH1.CFG An example configuration file for single node
operation.
9. DOORPCH2.CFG An example configuration file for Node 2 if
required.
10. DORPCH35.EXE You MUST compile your DOOR using the /L
DORPCH35.EXE parameter. The logic in this
library replaced most of the old GETIN2.
11. EXAMPLE.BAS A nice example DOOR (source code).
12. EXAMPLE.EXE The compiled ready-to-run EXAMPLE Door.
13. EXAMPLE.SCR NON-GRAPHICS file for EXAMPLE.EXE
14. EXAMPLEG.SCR GRAPHICS file for EXAMPLE.EXE
15. EXDOOR.BAT An typical DOOR batch file.
16. LINKER.BAT Batch file to LINK your .OBJ into an .EXE.
Page 3
DoorPch - Version 3.5
User's Guide for DOOR Programmers
Contents Of "ARC" File (Continued)
==================================
17. QBDTRPCH.ARC Info for DEBUG patch for DTR control in
QuickBASIC.
18. README.NOW If included, should be READ right away !
19. SECURITY.DOC How to use Mr. Clements "Security" System
20. SYSOP.DOC You are to include this documentation within
the ARC file containing your DOOR program.
The SysOp will need this information to
understand how to interface with doors
utilizing DOORPCH.
21. CHANGES.DOC This file contains a list of changes/fixes
made to DoorPch since Version 3.1 was
released. This file should be carefully
reviewed before using any new release of
DoorPch.
Page 4
DoorPch - Version 3.5
User's Guide for DOOR Programmers
Features Of This Release
========================
Does NOT require the use of CTTY !!
Constant monitoring of COM port. Returns to PCBoard if carrier
lost.
Supports Monochrome and Color PCBoard systems.
Supports all the standard COLORs in ANSI.SYS including High
Intensity and Blinking text.
Supports the use of ANSI Music.
Informative line 24/25 display similar to PCBoard.
Full interface to PCBoard by reading PCBOARD.SYS, PCBOARD.DAT and
the USERS files.
Compatible with Networks using SHARE. A node blocker routine,
limits DOOR programs that don't/can't run on two nodes to run on
one node at a time.
Easy to interface with. Minimal information required from your
DOOR program.
DOOR can run in LOCAL mode as well as use the COM port.
Screen positioning (Col & Row) allow DOORS to update the screen
of the caller rather than scrolling text (ANSI codes). This is
very useful for DOORs which display a "board" on the screen.
Allows SysOp to CHAT with caller in DOOR (F10). Supports word
wrapping at end of line similarly to PCBoard. All CHAT time
credited so caller does not lose any time.
SysOp can exit to DOS from inside the DOOR and return (F5).
Includes a "standard" high score routine for tracking and
maintaining a bulletin for each DOOR game.
Provides the ability to "read" GRAPHICS and NON-GRAPHICS files
from disk to display to a caller. These files may be a menu for
your door, perhaps a logon or logoff screen etc. Its very easy!
Also supports a DoorPch DOOR Monitor utility which provides a
complete DOOR environment (coming in the near future).
Allows the use of ALT-N (SysOp NEXT ON).
Allows the use of ALT-X (Exit to DOS after caller).
Page 5
DoorPch - Version 3.5
User's Guide for DOOR Programmers
Features Of This Release (Continued)
====================================
Provides Alarm Toggle (F4).
Provides Bell Toggle (F7).
Provides memory and string space available (F6).
Allows SysOp to force the caller to return to PCBoard (F8).
Ability to turn display on and off (F9).
Ability to temporarily increase or decrease a callers time in the
DOOR (Up and Down KEYS).
Supports 19,200 BPS modems including Hayes V Series. Also
support CTS checking (MNP flow control).
Auto detection of network operation.
Reduces callers time if an Event is scheduled.
Monitoring of soft errors and reporting to the SysOp of errors.
Results are written to the local console and to a disk file:
DOORPCH.ERR
Error free ! Well, maybe not, but we strive to attain "zero-
defects".
Cost is small compared to the benefits.
Last; but not least, Compatible with PCBoard Version 14.0 !
Page 6
DoorPch - Version 3.5
User's Guide for DOOR Programmers
Operating Environment
=====================
DoorPch supports COM1 and COM2 only !!
The use of CTTY is NOT necessary when this code is used.
The memory addresses used by this code are those used by the IBM
PC and "true" compatibles such as AT&T. This code was developed
for Microsoft QuickBASIC 3.0. It may NOT be used with other
versions of QuickBASIC. QuickBASIC 4.0 was NOT used to create a
LIB file due to problems detected in its use on 80286 CPU's
running multi-tasking software (DoubleDOS & Taskview).
Be sure to either include a (patched for DTR) version of
BRUN30.EXE in your DOOR ARC file or provide a way for other
SysOps to get a version from you. We suggest including in your
ARC file.
This program (and your system) should be protected by PCBTrap.
This program and examples of its use can be found in the version
14 documentation. However, this DORPCH35.EXE logic will detect a
NOCARRIER condition and branch back to PCBoard eliminating the
need for WATCHDOG. To run a DOOR in LOCAL mode, WATCHDOG CANNOT
be running. This exact code is currently used in a number of DOOR
programs on our BBS's.
Page 7
DoorPch - Version 3.5
User's Guide for DOOR Programmers
Planned Future Enhancements
===========================
We are currently planning to provide support for other BBS
systems. Some of these are: WildCat!, RBBS, Etc.
Provide "full" support for both Quick Basic Version 3.0 & 4.x.
We continue to use QuickBASIC 3.0 simply because we had found
many problems using the QuickBASIC 4.x compilers. The problems
did not materialize until we operated TWO DOORS compiled with
DoorPch (using QuickBASIC 4.0) in both partitions under DoubleDOS
3.1V and 4.0. A single DOOR would operate fine. However TWO
doors caused the system to "hang".
We will look into all the ramifications of these compilers. If a
solution can be found, we will provide a QuickBASIC 4.x LIB file
which will allow you to static LINK with the libraries rather
than the current dynamic link provided by the QuickBASIC 3.0
environment.
Page 8
DoorPch - Version 3.5
User's Guide for DOOR Programmers
DoorPch Configuration File
==========================
File Name: DOORPCHn.CFG, where n is 1 or 2.
The data in this file tells DoorPch where the PCBOARD.SYS file is
located. The location of the PCBOARD.DAT and USERS files are
derived. Place this file in the same sub-directory (default) as
the executable DOOR program. The data in each record MUST begin
in column 1. This file is OPEN'ed as file #1. It is left OPEN for
your convenience.
You may add additional records beginning at record # 5 if you
wish to pass additional information that your program may need to
run. If you do not need anything additional in this file, you may
CLOSE #1 following the initial $INCLUDE DOORPCH.BEG statement:
Rec#1=> C:\PCB\PCBOARD.SYS (Your location for the .SYS file)
Rec#2=> The Black Hole BBS (Your BBS name)
Rec#3=> Clint (The First name of the Sysop)
Rec#4=> Labarthe (The Last name of the SysOp)
Page 9
DoorPch - Version 3.5
User's Guide for DOOR Programmers
DoorPch Routines
================
The following list outlines the various routines that are
available in DoorPch Version 3.5 for your usage.
Subroutine Name Subroutine Usage
------------------------ -----------------------------------
10000 (label) The Error routine. You should
or insure that if you change the ON
ERR.ROUTINE (label) ERROR GOTO xxx statement that it is
restored to 10000.
CAPS A CALL to this subroutine will
cause anything in ARG$ to be put in
first letter caps. IE: DOORPCH
would change to DoorPch.
CENT(anystring$) Leading spaces are appended to
anystring$ so as to center the
string for output.
COLOR.CHK A CALL to this routine will cause
LN$ to be outputted in a color
format. The format is anything
contained between the (,<,[
and>,],) char will be a different
foreground color. Either red for
numbers, cyan for uppercase text or
green for lowercase text.
CLR.SCRN Do NOT do a CLS or send CHR$(12) to
the COM port. Rather do a CALL
CLR.SCRN. The Lines 24 and 25 will
then be refreshed on the screen.
CVTTIME This routine will call GETTIME &
FORMATTIME to perform the
conversion.
DELAY.TIME (D.TIME%) Call this routine and pass an
integer in order to generate a
delay expressed in TENTHS of a
second.
ENTER A call to this routine will
generate a "Press <ENTER> to
continue.." and wait for a CR.
Page 10
DoorPch - Version 3.5
User's Guide for DOOR Programmers
DoorPch Routines (Continued)
============================
EXITG Call this routine when you are
ready to terminate your DOOR
program.
FORMATTIME Using HOURS% and MINUTES% this SUB
will format string DISPTIME$ with
the format HH:MM.
GET.DAY (TDATE$,DAY%) A call here will convert any date
put in TDATE$ to the day it is from
the beginning of the year and
returned in DAY%. TDATE$ format:
DD/MM/YYYY.
GET.INKEY This SUB closely emulates BASIC's
INKEY$ command. It looks for a key
on the COM port or local keyboard.
It stores the last key entered in
USR.KY$. It does NOT print to any
device nor does it update ARG$. The
door author must keep track of
"keyboard timeouts" and printing
the output, if necessary.
GET.KEY CALL to this subroutine when you
wish a character input WITHOUT the
caller pressing RETURN ! Character
is NOT echoed.
GET.KEYECHO Performs the same function as
GET.KEY but echoes the character
tothe caller and the local screen.
GET.KEYLOOP This SUB "looks" for input. If a
key was entered it will be placed
in USR.KY$ and echoed to the
caller. If NO key was entered then
USR.KY$ will be empty. The key
entered will be concatenated to the
end of ARG$. ARG$ should be
cleared prior to CALLing this SUB.
This routine allows you to check
for input and continue processing.
You must keep track of the callers
"keyboard time" to be sure they
have not fallen asleep !
Page 11
DoorPch - Version 3.5
User's Guide for DOOR Programmers
DoorPch Routines (Continued)
============================
GETTIME Call this SUB to get obtain the
following variables:
HOURS% - The current hour
MINUTES% - The current minute
SECONDS% - The current second
SINCEMID# (Double) -
Seconds since midnight
HIGH.SCORE This is a standardized HIGH SCORE
routine. The variables HSCR#,
FIRST$, LAST$, and PROGB$ are
important in here.
INITIALIZE The DOORPCH.BEG logic will CALL
this subroutine to initialize
DORPCH35.EXE (and your DOOR).
IN.PUT CALL to this subroutine to output
the contents of OT1$ and LN$. This
routine then waits for the caller
to respond with input which is
returned in ARG$. This subroutine
is used to ask a caller for a
response.
LCONV(string) Will convert "string" to all
lowercase characters.
LEFTTRUN(string) Will truncate all leading spaces
from "string".
MORE A CALL to MORE will output a prompt
and waits for a CR. Check for a
"E" in ARG$. If found then cause
your output to stop.
MUSICG CALL to this subroutine to output
the contents of MUSIC$. MUSIC$ MUST
be filled with valid notes, pauses,
timing, and octave commands.
NAMEG Any true name put in ARG$ will be
converted to proper case.
OUT.NCR CALL to this subroutine to output
the contents of LN$. The CURSOR
will remain at the end of the line.
A CR & LF will NOT be sent.
Page 12
DoorPch - Version 3.5
User's Guide for DOOR Programmers
DoorPch Routines (Continued)
============================
OUT.PUT CALL to this subroutine to output
the contents of LN$.
READ.TXT(filename$) CALL this SUB with the name of a
file to display to the caller. The
SUB will look for files ending in a
"G" for graphics callers. If a "G"
file does not exist the SUB will
simply OPEN filename$. This
feature is very nice for displaying
menus, opening or closing screens
to callers. The drive & path may
also be included with the file
name.
RIGHTTRUN(string) Will truncate all trailing spaces
from "string".
TRUN(any string) CALL this routine to cause a
truncations of ALL leading spaces
as well as all trailing spaces in
the passed parameter string.
UCONV(string) Will convert "string" to all
uppercase characters.
All non documented calls are at your own risk, and may change at
anytime.
Page 13
DoorPch - Version 3.5
User's Guide for DOOR Programmers
DoorPch Variables
=================
The following variables are used to pass information between your
DOOR program and DoorPch.
Variable Definition
----------------------- ----------------------------------
ARG$ This string contains the data
returned by a CALL IN.PUT,
CALL GET.KEY or CALL GET.KEYECHO.
ALIAS.FIRST$ If run by the DoorPch MONITOR (not
yet avail), this will be the call-
ers FIRST name.
ALIAS.LAST$ Same as above except LAST name.
BBSSYS$ The name of the BBS Software.
Example: PCBoard
BAUDCONN$ Contains the baud rate at which the
caller connected to the BBS system.
The variable is in STRING format.
BAUDOPEN$ Contains the baud rate at which the
modem was opened by the door. This
may not contain the same value as
BAUDCONN$. The variable is in
STRING format.
BELL% Notifies DoorPch to output a BELL
tone. If BELL% = 1. A value of 0
will NOT output a BELL (default).
BGC% Background color
O for BLACK (Default)
1 for RED
2 for GREEN
3 for YELLOW
4 for BLUE
5 for MAGENTA
6 for CYAN
7 for WHITE
BLINK% When set to 1 all text displayed
will BLINK. Default is 0.
CALLALARM% A value of 1 indicates that F7 has
been toggled.
Page 14
DoorPch - Version 3.5
User's Guide for DOOR Programmers
DoorPch Variables (Continued)
=============================
Variable Definition
----------------------- ----------------------------------
CENTER% Will center LN$ when it is OUT.PUT.
CENTER% = 1: LN$ = "Howdy": CALL
OUT.PUT
COMPRTOPN% This variable is required by the
Error Handling routine 10000.
DAY% See below variable TDATE$
D.TIME% The number of TENTHS of seconds to
delay when CALLing DELAY.TIME
DISPLAY% The LOCAL console display. A value
of 1 denotes "on". Zero (0) de-
notes "off". READ-ONLY - DO NOT
ALTER.
DISPTIME$ Returned by CVTTIME or FORMATTIME.
Returns hours and minutes in the
format HH:MM
DMIN% The number of MINUTES the caller
has remaining in the DOOR.
FGC% Foreground color.
0 for BLACK (be careful)
1 for RED
2 for GREEN
3 for YELLOW (Default)
4 for BLUE
5 for MAGENTA
6 for CYAN
7 for WHITE
FIRST$ The first name of the caller.
GRAPHICS% When equal 1 then the caller is in
GRAPHICS mode. When 0 they are NOT
in GRAPHICS mode.
HIGH% Determines if text should be in
HIGH INTENSITY. Default is 1. For
LOW intensity set this variable to
0 and set LOWER to 1.
Page 15
DoorPch - Version 3.5
User's Guide for DOOR Programmers
DoorPch Variables (Continued)
=============================
Variable Definition
----------------------- ----------------------------------
HOURS% Returned by CALL GETTIME. The
current HOURS.
HSCR# Keep track of game high scores in
this variable. It is used by the
SUB HIGH.SCORE which can then be
called just before you end your
DOOR game.
LAST$ Last name of the caller, UPPER case
LN$ Populate this string with your
output line. This data will be
displayed to the console and sent
to the COM port.
LOCALUSR% If set to a 1, then the Door is
running in LOCAL mode.
MINUTES% Returned by CALL to GETTIME. The
current MINUTES
NAME$ Name of caller plus 2 spaces.
NETWORK% If found set to a 1 then the
PCBOARD.DAT indicates you are
running in a network. Use this
variable to determine when Network
logic (i.e. LOCK, UNLOCK etc.)
should be used. IMPORTANT!!
NODE% Set this variable to 1 if you
require DoorPch to use LOCKing.
Default is 0, and will cause your
program to run on one node at a
time.
OT1$ String used by DoorPch as a prefix
when sending data to the COM port.
PAGEBELL% A value of 1 indicates F4 is tog-
gled ON.
PARAM$ Any parameters passed to your
program will be in this string. The
parameters must start with a "/".
Page 16
DoorPch - Version 3.5
User's Guide for DOOR Programmers
DoorPch Variables (Continued)
=============================
Variable Definition
----------------------- ----------------------------------
PROGB$ You MUST populate this variable
with the name of your DOOR program
BEFORE the INCLUDE for DOORPCH.BEG
but after the INCLUDE for
DOORPCH.USR.
Example: PROGB$ = "TGTRIVIA."
Note the period(.)>>>>>>>>>>^
PROGNAME$ You populate this string with the
literal name of your DOOR program.
Example:
PROGNAME$ = "Top Gun Trivia"
R.ELEASE$ Same as above. The Release number
of your DOOR program.
Example: R.ELEASE$ = "1.0"
RETURNCASE% If set to a 1 then ARG$ is returned
in UPPER case. If set to a -1 then
ARG$ is returned in LOWER case. If
set to a 0 then ARG$ is returned,
as keyed, unchanged.
SECONDS% Returned by CALL to GETTIME. The
current SECONDS.
SINCEMID# Returned by CALL to GETTIME. The
number of SECONDS since midnight.
SYSFIRST$ The FIRST name of the SysOp from
the DOORPCHn.CFG file. FIRST$ will
be populated with this name when
the user record number is 1.
SYSLAST$ The LAST name of the SysOp from the
DOORPCHn.CFG file. LAST$ will be
populated with this name when the
user record number is 1.
SYSNAME$ Populated with the name of YOUR
BBS. Extracted from [DOORPCHn.CFG]
record #2.
SYSOP% If set to 1, indicates the SysOp is
using the DOOR.
Page 17
DoorPch - Version 3.5
User's Guide for DOOR Programmers
DoorPch Variables (Continued)
=============================
Variable Definition
----------------------- ----------------------------------
TBSN% Set this variable to a value great-
er than 1 and DoorPch will TAB to
the specified TAB position. Reset
to 1 after CALL.
TDATE$ Populate this string with a valid
date (in this century). The day of
the year is returned in DAY%. See
GET.DAY SUB.
TIME.ON# The elapsed time this call in the
DOOR (Double precision) - seconds
TIMESTART# The time the caller entered the
DOOR (Double precision) - seconds
XPOS% Used to position the cursor. Use
only when doing LOCATE "type"
logic. XPOS% is the ROW number (1
to 23). Your value is set to a
NEGATIVE value once used. You may
use it to determine the last value
you had set.
YPOS% Same as XPOS% only for the COLUMN
position (1 to 79). Your value is
set to a NEGATIVE value once used.
You may use it to determine the
last value you had set.
Page 18
DoorPch - Version 3.5
User's Guide for DOOR Programmers
Structure Of A DOOR Program
===========================
The following information provides a general overview of how you
construct a DOOR program. The process is very easy and you can
gain a lot of insight by reviewing the example DOOR that is
provided in the "ARC" file. The basic format of a DOOR program is
as follows:
Start of Program -----------------------------
' $INCLUDE: 'DOORPCH.USR'
PROGNAME$ = "Example" ' These
PROGB$ = "EXAMPLE" ' four
R.ELEASE$ = "1.0" ' MUST
NODE% = 1 ' be populated
' $INCLUDE: 'DOORPCH.BEG' ' CALLs INITIALIZATION code in
' DORPCH35.EXE. If you had other
' information within. DOORPCHn.CFG,
' you would continue reading the
' file here then CLOSE #1.
.
. Your programs logic
.
' $INCLUDE: 'DOORPCH.END'
End of Program -------------------------------
Include File Usage
==================
The "DOORPCH.USR" include file establishes the required linkage
for all variables used in the DoorPch environment. These
variables are used by you (the DOOR programmer) to communicate
your needs to DoorPch.
The "DOORPCH.BEG" include file calls the initialization routines
used in DoorPch in order to read the configuration file,
initialize variables, ready the COM port, Etc.
The "DOORPCH.END" include file provides a common set of error
routines and a set of conversion routines for accessing the
facilities of DoorPch by Basic line numbers. Note: Two choices
are available to you if you are upgrading from an earlier version
of DoorPch: A) Leave your existing DOOR program coded the way
you originally coded it (IE: GOSUB 10170, GOSUB 10200 etc), or
B) Convert your existing DOOR program to use CALL statements thus
eliminating the use of code in DOORPCH.END.
New doors should utilize CALLs to perform DoorPch functions.
Page 19
DoorPch - Version 3.5
User's Guide for DOOR Programmers
Opening and Closing of Files
============================
File # 1 is left OPEN for you. You may add records to
DOORPCHn.CFG if you wish after the mandatory four records. Once
returned from the Initialization code (DOORPCH.BEG), you must
read YOUR records from File # 1. Then be sure to CLOSE #1.
Whether you read data from the (.CFG) file or not you MUST CLOSE
# 1.
File # 2, # 3 and # 4 are reserved for use by DoorPch. These
files MUST NOT be used or a Doorpch fatal error most likely will
occur at some point in your programs execution. You may start at
File # 5.
Starting A DOOR
===============
A run-time parameter is required to invoke your DOOR program.
Other parameters may also be passed so long as the first
parameter after the .CFG file name begins with a slash "/". If a
slash is found by DoorPch, the slash and all the data which
follows it are available in the variable: PARAM$ (see below under
VARIABLES).
Example:
TGTRIVIA TRIVIA1.CFG would invoke the program TGTRIVIA.EXE
passing parameter TRIVIA1.CFG to the program. The contents of
the .CFG are:
C:\PCB\PCBOARD.SYS <=== The location of PCBOARD.SYS
The Black Hole BBS <=== Your BBS name goes here
Clint <=== SysOps FIRST name
Labarthe <=== SysOps LAST name.
Note: File # 1 is left OPEN. You may add records to this file
if you need to pass additional information to your DOOR
program. Remember to CLOSE # 1.
Terminating A DOOR
==================
How to terminate the DOOR. Be certain all YOUR files (not those
used by Doorpch) are CLOSEed. Then simply do the following:
CALL EXITG
You will not be returned from this SUB routine. The DOOR will
terminate within DoorPch code.
Page 20
DoorPch - Version 3.5
User's Guide for DOOR Programmers
Compiling Your DOOR Program
===========================
A BATch file is included (COMPILE.BAT). Execute this batch file
with your source module as a parameter.
Example: COMPILE TGTRIVIA.BAS
When the batch file ends you will have an OBJect module present
in your current directory.
Linking Your DOOR Program
=========================
A BATch file is included (LINKER.BAT). Execute this batch file
with your OBJect module as a parameter.
Example: LINKER TGTRIVIA.OBJ
When the batch file ends you will have an EXEcutable module
present in your current directory.
>> Be careful here: Giving the linker the name of
your SOURCE module will cause a LINK failure
and the SOURCE module will be DESTROYED. You
may wish to save your source prior to
executing this BATch file.
Page 21
DoorPch - Version 3.5
User's Guide for DOOR Programmers
Executing Your DOOR Program
===========================
Your new .EXE module now contains all the necessary code to
function as a DOOR. The .EXE module requires the QuickBASIC
run-time routines from Microsoft (BRUN30.EXE) be present
somewhere in the PATH when you execute your DOOR program. You
must also have a DOS Environment variable set for Doorpch's
use. Place this statement in your AUTOEXEC.BAT file:
Example: SET DOORPCH=PCB
Finally, since DORPCH35.EXE is a QuickBASIC 3.0 LIBRARY, you
have two choices where you may place this file:
1) In the current directory, OR
2) Set an environment variable
Example: SET LIB=<path to DORPCH35.EXE>
Option 2 is probably your best choice. Just place the "SET"
statement in your AUTOEXEC.BAT file.
A small example of a DOOR program is included in the DORPCH35.ARC
file: EXAMPLE.BAS. You can look this program over for examples
of many of the Doorpch functions.
Page 22
DoorPch - Version 3.5
User's Guide for DOOR Programmers
ANSI Colors Graphics
====================
The following information outlines the use of various Doorpch
variables to control the foreground/background color,
highlighting, and blinking capabilities.
Intensity Of Text
-----------------
In order to for any text you wish to display to be in high
intensity, simply set the variable HIGH% = 1. Setting the same
variable to 0(zero) will display in low intensity.
Blinking Text
-------------
In order to for any text you wish to display to be blinking,
simply set the variable BLINK% = 1. Setting the same variable to
0(zero) will turn off the blinking attribute.
Foreground/Background Colors
----------------------------
To modify the colors that your text displays in, simply set the
two variables FGC% or BGC% to one of the values in the following
table for the desired effect:
1 for RED /
2 for GREEN /
* 3 for YELLOW /
4 for BLUE <== Correspond to ANSI codes
5 for MAGENTA \
6 for CYAN \
7 for WHITE \
(*) - defaults
Page 23
DoorPch - Version 3.5
User's Guide for DOOR Programmers
Printing Output
===============
Printing Complete Line
----------------------
To write to the COM port a complete line of text:
Place your text in LN$ and CALL OUT.PUT
To center the text all you need to do is make
CENTER% = 1 then CALL OUT.PUT. The required spaces will
be added to center your text.
Printing A Partial Line
-----------------------
To write to the COM port a partial line of text holding
the cursor at the end of the printed text:
Place your text in LN$ and CALL OUT.NCR.
Example: To print a red "Hi" and a yellow " There"
FGC% = 1
LN$="Hi":CALL OUT.NCR
FGC% = 3
LN$=" There":CALL OUT.PUT
Printing A Line & Get A Response
--------------------------------
Place your text in LN$ and CALL IN.PUT. Your response will be in
ARG$. Setting RETURNCASE% to 1 will result in the response being
returned in UPPER case. Setting this value to -1 (minus 1) will
return a response in LOWER case. Setting the value to 0 (zero)
will return the response as keyed without conversion. The DE-
FAULT is RETURNCASE% = 1. If you set it to zero or minus one (-1)
it will be reset to 1 on the next CALL to IN.PUT.
Example:
RETURNCASE% = -1
LN$="Are you finished ? ":CALL IN.PUT
IF ARG$="y" then do something...
Page 24
DoorPch - Version 3.5
User's Guide for DOOR Programmers
Printing Output (Continued)
===========================
Printing with TAB's
-------------------
To print at a TAB position: Set TBSN% to your TAB value.
Example:
TBSN%=50:LN$="Howdy":CALL OUT.PUT
The above would print beginning in column 50.
Ringing the BELL
================
Please do not WAKE UP the SYSOP! If your DOOR program needs to
ring the bell, please do it this way ! Set BELL% = 1. The bell
will not be sent to the console unless the door is running in
LOCAL mode.
Example: LN$ = "Ooops !": BELL% = 1: CALL OUT.PUT
Adding Color The Easy Way
=========================
With DoorPch Version 3.5 comes a new way to generate those fancy
color displays. A CALL to COLOR.CHK will colorize anything in
LN$. You must first set the foreground (FGC%) and the background
(BGC%). Then load LN$ with data, and make the CALL. Anything
contained between [,(,< and >,),] will be colorized. Anything
before a "-" will be colorized.
The following rules apply for colorizing:
A. If CENTER% = 1 the text will be centered.
B. If BLINK% = 1 then all text inside of the delimiters
<>, [], or () will be blinking.
C. Numbers will be RED unless FGC% = 1 (red) then
numbers will be BLUE.
D. Uppercase characters will be CYAN unless FGC% = 6
(cyan) then they will be YELLOW.
E. Lowercase will be GREEN unless FGC% = 2 (green)
then lowercase will be MAGENTA.
The COLOR.CHK SUB will output characters but will NOT line feed.
You must CALL OUT.PUT to get a line feed.
Page 25
DoorPch - Version 3.5
User's Guide for DOOR Programmers
Sending ANSI Music
==================
Place your ANSI music characters in MUSIC$ and CALL MUSICG. No
control codes or escapes sequences are put in MUSIC$, just raw
notes and QuickBASIC music codes. DoorPch will handle and load
the ANSI sequences needed to make your music work locally or
remotely. All notes will be converted to uppercase. Refer to
your QuickBASIC manual and use only the data that is contained
between the quotes. Doorpch will handle the PLAY and VARPTR$
commands.
Ask your users:
Can you handle music [Y/n]?
If yes, then populate MUSIC$ with your music and CALL
MUSICG.
Note: Music will NOT be played to the local console if the
system is in a NETWORK and the DOOR is in LOCAL mode. Some
network servers cannot handle background music being played.
Example:
FGC% = 2: LN$ = "Can your system handle music [Y/n] ? "
CALL COLOR.CHK: CALL GET.KEYECHO
IF ARG$ = "Y" THEN
.
.your music logic
.
ELSE
.
.No music logic
.
END IF
Bell or Alarm Toggles
=====================
If PAGEBELL% = 1 then F4 has been togged ON.
If CALLALARM% = 1 then F7 has been toggled ON.
Clearing The Screen
===================
Clear the local and callers screen and refresh LINES 24/25 of
the local console:
CALL CLR.SCRN
Page 26
DoorPch - Version 3.5
User's Guide for DOOR Programmers
BASIC Keywords
==============
The following BASIC keywords should NEVER be used in a DOOR that
you write. Unpredictable results are certain if you do NOT
follow the rules outlined in this document.
Never use any of the following BASIC verbs:
LOCATE, PRINT, VIEW PRINT, PRINT USING, CLS, COLOR,
DRAW, END, INKEY$, KEY, ON COM,OPTION BASE, PAINT, PEN,
PLAY, POS(0), CSRLIN, RESUME, RUN, SCREEN, SHELL,
SOUND, STICK, STRIG, SYSTEM, WIDTH, WINDOW
There may be others . . .
Tracking High Scores & Producing A Bulletin
===========================================
Load PROGB$ with your Door program's name excluding the(exe).
Put this before the INCLUDE of DOORPCH.BEG.
Example: PROGB$ = "TGTRIVIA."
Keep track of your high score in a variable: HSCR#. If HSCR#=0
then NO storage of a user score is done, rather the caller is
asked if they would like to view the high scores.
Prior to doing the CALL EXITG or doing GOSUB 10410,CALL
HIGH.SCORE. A file will be created: <doorname.BUL>.All game
information will be included in this file. The location of an
optional bulletin is also contained therein.
The sysop should be the first to run any game calling HIGH.SCORE.
He will be asked various questions to install the
high.score/bulletin generator. Thereafter the sysop(only rec #1
sysop) can reset the bulletins by entering a"R" at the "Do you
want to see the high scores ?" prompt.If the SysOp is NOT the
first player to use the DOOR then a default .BUL file is created.
You can use a text editor to add a Bulletin name at a later time.
The former is the preferred method.
Page 27
DoorPch - Version 3.5
User's Guide for DOOR Programmers
Sysop Information
=================
Line 24 Of The Display
----------------------
The information on this line is obtained from PCBoard system
files. Listed below is the information provided.
A. Node number (if in a network).
B. The baud rate of the caller.
C. Callers name.
D. The name of your DOOR program and its release number
Example: Top Gun Trivia version 3.1
E. The time the caller entered the DOOR.
F. If the ALT-N or ALT-X keys have been toggled, then the
indicator will be displayed similarly to PCBoard.
G. The current time.
H. How many hours and minutes the caller has left in this
DOOR. You may temporarily add or subtract from the
caller's time remaining, use the UP or DOWN keys.
Line 24/25 Of The Display
-------------------------
The keys listed below will cause various values to be
displayed on line 25 of the console:
A. F1 key: The current release of Doorpch QuickBASIC version
used to compile your DOOR.
B. F2 key: Displays the callers ALIAS name if it is used and
the variables ALIAS.FIRST$ and ALIAS.LAST$ are
populated.
C. F3 key: Not used in Doorpch Version 3.5.
D. F4 key: If toggled on will display a (B)ell on the screen.
This key value will be returned to PCBoard when
the door terminates.
E. F5 key: Nothing displayed. Activates the DOS SHELL
F. F6 key: Displays memory and string space available to the
DOOR.
G. F7 key: If toggled on will display a (A)larm on the
screen.
H. HOME: Will display a HELP menu on line 25.
I. END: Will resume to "normal" line 24/25 display.
J. PG-UP: Will display the Message Base Areas the user is
authorized to access.
K. PG-DN: Will display Data and Voice Phone Numbers
Expiration Date
Password
User & Sysop Comments
Page 28
DoorPch - Version 3.5
User's Guide for DOOR Programmers
DoorPch History
===============
Well, originally I wrote the first version of Doorpch. I saw
apiece of code for RBBS Doors. I felt I could use it as a
foundation for a PCBoard environment. The beginnings of Top Gun
Trivia were born - so was Doorpch Version 1.0.
I quickly saw missing features and bugs and on to release 1.1 and
so on until 2.6. Actually along the way I had a lot of help from
a lot of SysOps. Some were Beta Testers. Others gave me inspir-
ation while others actually provided code. At the moment, two
SysOps participated in the coding of Doorpch 3.5: Clint Labarthe
and Terry Shockley. Raymond Clements was very helpful while the
code was still in a QuickBASIC 3.0 format.
Then, Ben Perron restructured the code for QuickBASIC3.0 lib-
raries. Pat Carone was an early beta-tester.Who knows how much
these fine SysOps spent on long distance charges. You can bet is
was a bundle. Many thanks to them !!
Why a LIBRARY and NOT source code as in 2.6? That's a very good
question. SysOps simply made too many modifications. Some were
given to friends. An so it went. This code is not an attempt to
halt that type of creativity. Rather, it is to set the DOOR
standard. If you wish specific logic added that is not currently
in version 3.5, please let us know. Incorporated in version 3.4
is many, many hours of work and the ideas of countless SysOps
from around the world. Its the best we could do at this point.
That is where we are today. It is a full functional, full feature
LIBRARY for you to LINK your DOOR program too. We don't ask much
in return. A form is provided for you to at least tell us who is
using it and provide a contribution of sorts. I can tell you
this: You won't get rich on DOORs. We won't get rich on you. We
all benefit from each other.
Page 29
DoorPch - Version 3.5
User's Guide for DOOR Programmers
DoorPch Credits
===============
I'd like to thank an old friend - Andy McPhee - at Pacific Bell
in California. He was my supervisor during my first coding
assignments. He once told me: "If you can think if it, you can
code it !". Well, to all of you SysOps and to you Andy, here it
is ! We did just that !
Thanks to Ben Perron who created the first DoorPch library for
Version 3.1 using DoorPch Version 2.6 source code as the basis
for the implementation. Without Ben's extra effort, DoorPch
would not be at the level it is at today.
Thanks to Dick Stout of Computer Technology who did much
alpha/beta testing. His system crashed so yours wouldn't. All of
his reported errors were corrected. This lead to a almost bug-
free crash proof environment.
Thanks to Mark Fletcher who was inspirational in the beginning
and there after provided code during the early going. He kept
the faith and used Doorpch from the beginning.
Thanks to Jerry Fields in Georgia for sacrificing his system
also. Many of the SysOPs simply could not wait for the finished
product. Jerry was one of them. We sure appreciate his enthusi-
asm.
Thanks also to Bud Napier in Massachusetts who kept the pressure
on and was willing to provide a beta site even with bugs in our
code.
A special thanks to Harold Thomson, a colleague at AT&T, who
wrote a myriad of assembler routines to assist us.
Thanks also to Terry Shockley and Charlie Wooster, AT&T SysOps
of the Deathstar BBS, for their assistance and constructive
reasoning during 3.5 development.
Finally, thanks to Richard Driggers, SysOp of Sparta BBS in New
Jersey for his belief in us. His dedication to the betterment of
BBS'ing gave us cause to continue our work. He provided a rich
test bed also. Our hats goes off to him.
Page 30
DoorPch - Version 3.5
User's Guide for DOOR Programmers
Reporting Problems
==================
If you require assistance beyond the instructions contained
herein, please call one of our BBS's:
BBS Phone SysOp
--------------------------------------------------------------
The Black Hole BBS (407) 260-6397 Clint Labarthe
The Death Star BBS (407) 875-4123 Terry Shockley
The Computer Playroom BBS (203) 584-1798 Ben Perron
Prime Beta Tester and DoorPch Contributor
The Pegasus BBS (502) 684-9855 Raymond Clements
Page 31
DoorPch - Version 3.5
User's Guide for DOOR Programmers
User Enhancement Requests
=========================
If you find that a function is not present in Doorpch and you
feel this enhancement would benefit others, then please provide a
Change Request (CR) to us in the following format. We will
attempt to incorporate your request a subsequent release.
Change Request (CR):
Date:
Author:
Description of enhancement: <Pseudo code, structured English
narrative or actual BASIC code>
If you have a working model of the code and wish to share it with
us, then by all means provide it. You may submit your request in
two ways: 1) uploading to one of our BBS's as a PRIVATE upload
and leaving a [C]omment identifying the upload to the SysOp or 2)
mailing your request to our address:
The Black Hole BBS
P.O. Box 151445
Altamonte Springs, Florida, 32701-1445
Enjoy Doorpch 3.5 !!
Clint Labarthe, SysOp, The Black Hole BBS, (407) 260-6397
Terry Shockley, SysOp, The Death Star BBS, (407) 875-4123
Page 32
DoorPch - Version 3.5
User's Guide for DOOR Programmers
Registration
============
The DoorPch source/library code is distributed for your use on a
trial basis. If you decide to utilize it in a DOOR program,
whether written for PCBoard (tm) or any other Bulletin Board
System, you are required to register your copy. We feel a
registration fee of $20.00 is reasonable. However, any amount
from $5 to $5,000,000 will be accepted.
If you are upgrading, a one time upgrade donation of $15.00 is
suggested. $ 5.00 is suggested upgrading from version over 3.1
there is simply so much more in this version over 2.6 that this
amount is more than worth it. If you include this logic in more
than one DOOR program, then please remit $5.00 for each
additional DOOR program you release in addition to the original
registration fee. We'd like to thank you for using DoorPch. We
hope it is as useful to you as it has been for us. Any and all
suggestions can be mailed to the address below or directly
conveyed to us on the Black Hole BBS (407) 260-6397.
This code will work without alteration with QuickBASIC 3.0 com-
piled programs. If you have a request for improvements/enhance-
ments or detect a bug, please let us know. We'll make everyeffort
to get the code changed thus helping all of us make betterDOORs.
The following registration is required of all doors released with
DoorPch 3.5 supporting PCBoard 14.0 ONLY. Version 3.1 should be
used for DOORS running under PCBoard 12.x.
To: Clint Labarthe
Black Hole Bulletin Board System
P.O. Box 151445
Altamonte Springs, Florida, 32701-1445
Version: _________________
I have incorporated DoorPch in the following DOOR programs. I am
remitting $5.00 for each of them.
____________________ ____________________ ____________________
____________________ ____________________ ____________________
____________________ ____________________ ____________________
Total DOOR's containing DoorPch: ______ @ $5.00 = $__________
Plus $20.00 Registration (unless already submitted) = $__________
or
Upgrade from version 2.x @ $15.00 = $__________
Upgrade from version 3.1 @ $ 5.00 = $__________
Total remitted $__________
Page 33
DoorPch - Version 3.5
User's Guide for DOOR Programmers
Signed: ______________________________ Date:____________
Thanks for your support !!
Clint Labarthe
Note:
Many of you have, at some time in the past, sent us a contribu-
tion for DoorPch. Those of you that have are excluded from the
$20.00 registration fee. We do, however, ask that you send $5.00
for each door written & released. Consider sending <something>
if you are upgrading from an earlier version of DoorPch.
Version 3.5 places you in sync with the future - PCBoard 14.0 !
Page 34
DoorPch - Version 3.5
User's Guide for DOOR Programmers
Trade Marks / Copyrights
========================
PCBoard (R) is a registered trademark of Clark Development
Company (CDC)
Microsoft (R) is a registered trademark of Microsoft Corporation.
DOS (MS-DOS) (R) is a registered trademark of Microsoft
Corporation.
BRUN30.EXE is (C) Copyright Microsoft Corporation, 1987
DoorPch (C) is Copyright, 1987 - 1989
Page 35